<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: bobo
  Date: 16-10-27
  Time: 上午11:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <jsp:include page="../layout/head.jsp" >
        <jsp:param name="title" value="注册管理员" />
    </jsp:include>
</head>
<body>
<div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 管理员列表</strong></div>
    <table class="table table-hover text-center">
        <tr>
            <th>序号</th>
            <th width="120">ID</th>
            <th>用户名</th>
            <th>级别</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${admins}" var="admin" varStatus="abc">
            <tr>
                <td>${abc.index+1}</td>
                <td>${admin.id}</td>
                <td><a href="${pageContext.request.contextPath}/admin/get?id=${admin.id}">${admin.name}</a></td>
                <td>
                    <c:if test="${admin.level==0}">超级管理员</c:if>
                    <c:if test="${admin.level==1}">文章管理员</c:if>
                    <c:if test="${admin.level==2}">用户管理员</c:if>
                    <c:if test="${admin.level==3}">类别管理员</c:if>
                </td>
                <td>
                    <div class="button-group">
                        <a class="button border-red" href="${pageContext.request.contextPath}/admin/del?id=${admin.id}"
                       onclick="if(confirm('删除后不可恢复'))return true;return false;">删除</a>
                    </div>
                </td>
            </tr>
        </c:forEach>
    </table>
</div>
</body>
</html>
